public class Dog {
    public String name;
    public double age;
    public void eat(){
        System.out.println(name+"在吃饭");
    }
    public void sleep(){
        System.out.println(name + "在睡觉");
    }
    public void bark(){
        System.out.println(name + "在汪汪汪");
    }

    @Override
    public String toString() {
        return "Dog{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
